<template>
    <div class="">
      <a-modal
        v-model:visible="visible"
        :maskClosable="false"
        :destroyOnClose="false"
        :title="title"
        :confirmLoading="loading"
        width="1000px"
        height="600px"
        @ok="save"
      >
        <a-spin :spinning="loading">
          <div class="o-auto" style="max-height: 700px">
            <Base ref="formRef"></Base>
          </div>
        </a-spin>
      </a-modal>
    </div>
  </template>
  
  <script lang="ts" setup>
  import { ref } from "vue";
  import { batchCreateAdStore } from "@/pages/NewBatchCreateAd/store/batchCreateAdStore";
  import _ from "lodash";
  import Base from "@/pages/NewBatchCreateAd/adx/xiaomi/monitor/Base.vue";
  
  const store = batchCreateAdStore();
  
  const formRef = ref();
  const title = ref<string>("编辑监控链接");
  
  const visible = ref<boolean>(true);
  const loading = ref<boolean>(false);
  
  const hide = () => {
    visible.value = false;
  };
  
  const getData = () => {
    const form = formRef.value.getData();
    return form;
  };
  
  const save = async () => {
    store.Monitor = getData();
    hide()
  };
  </script>
  
  <style lang="less" scoped></style>
  